﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using SportsStore.Domain.Abstract;
using SportsStore.Domain.Entities;
using Moq;

namespace SportsStore.UnitTests
{
    public static class UnitTestHelpers
    {
        public static void ShouldEqual<T>(this T actualValue ,    T expectedValue)
        {
            Assert.AreEqual(actualValue, expectedValue);
        }

        public static IProductsRepository MockProductRepository(params Product[] prods)
        {
            var mockProductRepos = new Mock<IProductsRepository>();
            mockProductRepos.Setup(x => x.Products).Returns(prods.AsQueryable());
            return mockProductRepos.Object;

        }
    }
}
